import { createRouter, createWebHistory } from 'vue-router'
import ShowView from '../views/template/Show.vue'
//我的桌面
import HomePageView from '../views/desktop/HomePage.vue' //首页显示
import MemoView from '../views/desktop/Memo.vue' //我的便签
import WaitingTaskView from '../views/desktop/WaitingTask.vue' //待处理任务
//常用工具
import CalendarView from '../views/desktop/instrument/Calendar.vue' //日历查询
import ScheduleView from '../views/desktop/instrument/Schedule.vue' //日程管理
import WeatherView from '../views/desktop/instrument/Weather.vue' //天气预报
import WebsiteGuideView from '../views/desktop/instrument/WebsiteGuide.vue' //常用网址
//通告管理
import CallboardsView from '../views/callboard/Callboards.vue'
// 文档管理
import DocumentListView from '../views/document/DocumentList.vue' //文档列表
import DocumentRecycleBinView from '../views/document/DocumentRecycleBin.vue' //文档回收站
//行政管理（会议室管理）
import ReserveView from '../views/administration/conference/Reserve.vue' //会议室预定
import ManagementView from '../views/administration/conference/Management.vue' //会议室预定管理
import ManagementUserView from '../views/administration/conference/ManagementUser.vue' //会议室预定管理(普通用户)
import ManageView from '../views/administration/conference/Manage.vue' //会议室管理
//(用车管理)
import ApplyForView from '../views/administration/car/ApplyFor.vue' //用车申请
import CarManageView from '../views/administration/car/Manage.vue' //车辆信息管理
import UseSealManageView from '../views/administration/UseSealManage.vue' //用章管理
import BookLendingManageView from '../views/administration/BookLendingManage.vue' //图书申请管理
import BusinessCardView from '../views/administration/BusinessCard.vue' //名片印制流程
//人事管理
import EvectionView from '../views/personnel/Evection.vue' //出差申请
import LeaveView from '../views/personnel/Leave.vue' //请假申请
import ProofOfIncomeVire from '../views/personnel/ProofOfIncome.vue' //收入证明流程
//系统管理
import DictionaryManageView from '../views/systematic/DictionaryManage.vue' //字典管理
import OperationLogView from '../views/systematic/OperationLog.vue' //操作日志
import OrganizationView from '../views/systematic/Organization.vue' //组织结构管理
import RoleManageView from '../views/systematic/RoleManage.vue' //角色管理
import UploadFileSettingsView from '../views/systematic/UploadFileSettings.vue' //上传文件设置
import UserManageView from '../views/systematic/UserManage.vue' //用户管理

//text测试窗口
import Demo1View from '../views/test/demo1.vue' //Demo1


const routes = [
  { //登录
    path: '/',
    name: 'login',
    component:()=>import('../views/register/login.vue')
  },
  { //左侧菜单导航栏
    path: '/show',
    name: 'show',
    component: ShowView,
    meta:{requiresAuth: true},
    children: [
      { //我的桌面
        path: '/HomePageView',
        component:HomePageView
      },
      { //通告管理
        path: '/CallboardsView',
        component:CallboardsView
      },
      //文档管理
      { // 文档列表
        path: '/DocumentListView',
        component : DocumentListView
      },
      { //文档回收站
        path: '/DocumentRecycleBinView',
        component : DocumentRecycleBinView
      },
      //行政管理
      { //（会议室预定）
        path:'/ReserveView',
        component: ReserveView
      },
      { //会议室预定管理
        path:'/ManagementView',
        component: ManagementView
      },
      { //会议室预定管理（用户）
        path:'/ManagementUserView',
        component: ManagementUserView
      },
      { //会议室管理
        path:'/ManageView',
        component: ManageView
      },
      { //(用车管理)用车申请
        path:'/ApplyForView',
        component: ApplyForView
      },
      { //车辆信息管理
        path:'/CarManageView',
        component: CarManageView
      },
      { //用章管理
        path:'/UseSealManageView',
        component: UseSealManageView
      },
      { //图书申请管理
        path:'/BookLendingManageView',
        component: BookLendingManageView
      },
      { //名片印制流程
        path:'/BusinessCardView',
        component: BusinessCardView
      },
      //人事管理
      { //请假申请
        path :'/LeaveView',
        component: LeaveView
      },
      { //出差申请
        path :'/EvectionView',
        component: EvectionView
      },
      { //收入证明流程
        path :'/ProofOfIncomeVire',
        component: ProofOfIncomeVire
      },
      //系统管理
      { //字典管理
        path :'/DictionaryManageView',
        component: DictionaryManageView
      },
      { //操作日志
        path :'/OperationLogView',
        component: OperationLogView
      },
      { //组织结构管理
        path :'/OrganizationView',
        component: OrganizationView
      },
      { //角色管理
        path :'/RoleManageView',
        component: RoleManageView
      },
      { //上传文件设置
        path :'/UploadFileSettingsView',
        component: UploadFileSettingsView
      },
      { //用户管理
        path :'/UserManageView',
        component: UserManageView
      },
      { //待处理任务
        path: '/WaitingTaskView',
        component: WaitingTaskView
      },
      { //我的便签
        path: '/MemoView',
        component: MemoView
      },
        //常用工具
      { //日历查询
        path: '/CalendarView',
        component: CalendarView
      },{ //日程管理
        path: '/ScheduleView',
        component: ScheduleView
      },{ //天气预报
        path: '/WeatherView',
        component: WeatherView
      },{ //常用网址
        path: '/WebsiteGuideView',
        component: WebsiteGuideView
      },
    ]
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },{
    path: '/Demo1View',
    name: Demo1View
  },

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
